package com.example.zhaoping.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_message")
public class Message {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    @TableField("fromType")
    private String fromType;
    @TableField("fromId")
    private int fromId;
    @TableField("fromAvatar")
    private String fromAvatar;
    @TableField("fromName")
    private String fromName;
    @TableField("toType")
    private String toType;
    @TableField("toId")
    private int toId;
    @TableField("toAvatar")
    private String toAvatar;
    @TableField("toName")
    private String toName;
    @TableField("createTime")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date createTime;
    private String content;
    private int readed;
}
